<!DOCTYPE html >
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="chrome=1">

    <!--
        /**
        * o------------------------------------------------------------------------------o
        * | This file is part of the RGraph package - you can learn more at:             |
        * |                                                                              |
        * |                          http://www.rgraph.net                               |
        * |                                                                              |
        * | This package is licensed under the RGraph license. For all kinds of business |
        * | purposes there is a small one-time licensing fee to pay and for non          |
        * | commercial  purposes it is free to use. You can read the full license here:  |
        * |                                                                              |
        * |                      http://www.rgraph.net/LICENSE.txt                       |
        * o------------------------------------------------------------------------------o
        */
    -->
    <title>RGraph: Javascript charts library - fuel charts</title>
    
    <meta name="keywords" content="rgraph html5 canvas example fuel chart" />
    <meta name="description" content="RGraph: Javascript charts library - Fuel chart example" />
    
    <meta property="og:title" content="RGraph: Javascript charts library" />
    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>

    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
    <link rel="icon" type="image/png" href="../images/favicon.png">
    
    <!-- Place this tag in your head or just before your close body tag -->
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.effects.js" ></script>
    <script src="../libraries/RGraph.fuel.js" ></script>
    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->

    <script>
        window.onload = function ()
        {
            // MIN, MAX, INDICATED
            var fuel1 = new RGraph.Fuel('fuel1',0,100,78);
            RGraph.isIE8() ? fuel1.Draw() : RGraph.Effects.Fuel.Grow(fuel1);

            var fuel2 = new RGraph.Fuel('fuel2', 50, 100, 67);
            fuel2.Set('chart.needle.color', 'blue');
            fuel2.Set('chart.colors', ['#ddf']);
            fuel2.Set('chart.labels.empty', 'Half full\r\n(50l)');
            fuel2.Set('chart.labels.full', 'Full\r\n(100l)');
            fuel2.Set('chart.icon', '/images/water.jpg');
            fuel2.Draw();
        }
    </script>


</head>
<body>

<h1>RGraph: <span>Javascript charts library</span> - Fuel Gauge charts</h1>

    <script>
        if (RGraph.isIE8()) {
            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag.</div>');
        }
    </script>
    
    <div>
        <p>
            The Fuel Gauge is a variation on the Meter that could be incorporated into a control panel or similar. The center image,
            the colors and the text can all be customised as the two examples below show. The border on the second chart is simply
            a CSS border on the canvas. The fuel icon is the default icon for the chart and uses a data: URL - ie there's no
            external image necessary.
        </p>
    
        <div>
            <ul>
                <li><a href="../docs/fuel.html">Fuel Gauge API documentation</a></li>
            </ul>
        </div>

        <div style="text-align: center">
            <canvas id="fuel1" width="200" height="200">[Please wait...]</canvas>
            <canvas id="fuel2" width="200" height="200" style="background-color: white; border: 1px solid #ccc">[No canvas support]</canvas>
        </div>
    </div>

</body>
</html>